/**
 * 用于存储键值对
 */
export default class ValuePair {
  constructor(key, value) {
    this.key = key;
    this.value = value;
  }

  toString(callback) {
    return callback ? callback(this.key, this.value) : `[#${this.key}: ${this.value}]`;
  }
}
